package com.lianzhihui.romeex.mvp.presenter;

import android.content.Context;

import com.lianzhihui.romeex.bean.RollingPoolAwardListBean;
import com.lianzhihui.romeex.mvp.model.MiningEarningsModelImp;
import com.lianzhihui.romeex.mvp.model.MiningEarningsModelInterface;
import com.lianzhihui.romeex.mvp.view.MiningEarningsView;

//逻辑实现
public class MiningEarningsPresnterImp implements MiningEarningsModelInterface {

    private final MiningEarningsView viewLayer;
    private final MiningEarningsModelImp modelImp;

    public MiningEarningsPresnterImp(Context context, MiningEarningsView viewLayer) {
        this.viewLayer = viewLayer;
        modelImp = new MiningEarningsModelImp(context, this);
    }

    public void requestRollingPoolAwardList(int page, int pageSize) {
        modelImp.requestRollingPoolAwardList(page,pageSize);
    }




    @Override
    public void responseRollingPoolAwardListSuccess(RollingPoolAwardListBean b) {
        viewLayer.responseRollingPoolAwardListSuccess(b);
    }

    @Override
    public void onFailure() {
        viewLayer.setFailure();
    }
}
